//
//  BBTextViewModel.m
//  BBKit
//
//  Created by apple on 2019/7/1.
//  Copyright © 2019年 baobao. All rights reserved.
//

#import "BBTextViewModel.h"

#define BBKIT_SETPRAGRA_UITEXTVIEW_API(methodName, paraType)    BBKIT_SETPRAGRA_API(methodName,paraType, UITextView, BBTextViewModel*)

@implementation BBTextViewModel

BBKIT_SETPRAGRA_UITEXTVIEW_API(delegate, id<UITextViewDelegate>);

BBKIT_SETPRAGRA_UITEXTVIEW_API(text, NSString *);
BBKIT_SETPRAGRA_UITEXTVIEW_API(font, UIFont *);
BBKIT_SETPRAGRA_UITEXTVIEW_API(textColor, UIColor *);

BBKIT_SETPRAGRA_UITEXTVIEW_API(textAlignment, NSTextAlignment);
BBKIT_SETPRAGRA_UITEXTVIEW_API(selectedRange, NSRange);
BBKIT_SETPRAGRA_UITEXTVIEW_API(editable, BOOL);
BBKIT_SETPRAGRA_UITEXTVIEW_API(selectable, BOOL);
BBKIT_SETPRAGRA_UITEXTVIEW_API(dataDetectorTypes, UIDataDetectorTypes);

BBKIT_SETPRAGRA_UITEXTVIEW_API(keyboardType, UIKeyboardType);

BBKIT_SETPRAGRA_UITEXTVIEW_API(allowsEditingTextAttributes, BOOL);
BBKIT_SETPRAGRA_UITEXTVIEW_API(attributedText, NSAttributedString *);
BBKIT_SETPRAGRA_UITEXTVIEW_API(typingAttributes, NSDictionary *);

BBKIT_SETPRAGRA_UITEXTVIEW_API(clearsOnInsertion, BOOL);

BBKIT_SETPRAGRA_UITEXTVIEW_API(textContainerInset, UIEdgeInsets);
BBKIT_SETPRAGRA_UITEXTVIEW_API(linkTextAttributes, NSDictionary *);

#pragma mark - UIScrollView
BBKIT_SETPRAGRA_UITEXTVIEW_API(contentSize, CGSize)
BBKIT_SETPRAGRA_UITEXTVIEW_API(contentOffset, CGPoint)
BBKIT_SETPRAGRA_UITEXTVIEW_API(contentInset, UIEdgeInsets)

BBKIT_SETPRAGRA_UITEXTVIEW_API(bounces, BOOL)
BBKIT_SETPRAGRA_UITEXTVIEW_API(alwaysBounceVertical, BOOL)
BBKIT_SETPRAGRA_UITEXTVIEW_API(alwaysBounceHorizontal, BOOL)

BBKIT_SETPRAGRA_UITEXTVIEW_API(pagingEnabled, BOOL)
BBKIT_SETPRAGRA_UITEXTVIEW_API(scrollEnabled, BOOL)

BBKIT_SETPRAGRA_UITEXTVIEW_API(showsHorizontalScrollIndicator, BOOL)
BBKIT_SETPRAGRA_UITEXTVIEW_API(showsVerticalScrollIndicator, BOOL)

BBKIT_SETPRAGRA_UITEXTVIEW_API(scrollsToTop, BOOL)

@end
